<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\bootstrap\ActiveForm;
?>

<div class="text-center">
<hr>
<?php 
	if($model->status == 2 ){ // 操作审核成功
		echo "<div class='alert alert-warning'>操作审核成功 </div>";	
	}elseif($model->status == 3){
		echo "<div class='alert alert-warning'>财务审核成功 </div>";	
	}elseif($model->status == 4){
		echo "<div class='alert alert-warning'>操作驳回</div>";	
	}elseif($model->status == 4){
		echo "<div class='alert alert-warning'>财务驳回</div>";	
	}
?>

<?php
	if($model->status == 1){ // 操作审批
		if($role == "管理员"){
?>
			<?php $form = ActiveForm::begin(['action' => 'status']); ?>
				<input type="hidden" name="id" value="<?= $model->id ?>">
				<?= \yii\helpers\Html::radioList("status", 2, [2=>'通过', 4=>'拒绝']) ?>	
				<button type="submit" class="btn btn-default">操作审核</button>
			<?php ActiveForm::end(); ?>

<?php
		}
	}
?>



<?php
	if($model->status == 2){ // 操作审批成功
		if($role == "财务"){
?>
			<?php $form = ActiveForm::begin(['action' => 'status']); ?>
				<input type="hidden" name="id" value="<?= $model->id ?>">
				<?= \yii\helpers\Html::radioList("status", 3, [3=>'通过', 5=>'拒绝']) ?>	
				<button type="submit" class="btn btn-default">财务审核</button>
			<?php ActiveForm::end(); ?>
<?php
		}
	}
?>

</div>

